home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
util
/
text
/
xes.lha
/
XES
/
REXX
/
VER.xdme
< prev
next >
Wrap
Text File
|
1995-08-14
|
1KB
|
42 lines
/**************************************************************************/
/* $VER: VER.xdme 1.3 (14 Aug 1995) */
/* Updates the version in a script. */
/* USAGE: rx2 VER <arg1> <arg2> */
/* arg1 = RX for ARexx scripts or XRC for XDME scripts */
/* arg2 = V for incrementing version or R for incrementing revision. */
/* The filename in the string must match the current filename. Otherwise, */
/* it replaces the first line with a version 1.0 version string. */
/**************************************************************************/
ARG t c
OPTIONS RESULTS
'rxresult' $fname
name = RESULT
IF t = "RX" THEN cmt = "/" || "*"
IF t = "XRC" THEN cmt = "#"
xcom = "top first fail? (find $VER:) scanf w"
xcom
'rxresult' $scanf
word = RESULT
IF word = "$VER:" THEN DO
'rxresult' $currentline
line = RESULT
deline
ver = WORD(line, 4)
dot = index(ver, ".")
IF c = "V" THEN
ver = LEFT(ver, dot-1)+1 || ".0"
ELSE IF c = "R" THEN
ver = LEFT(ver, dot-1) || "." || DELSTR(ver, 1, dot)+1
END
ELSE
ver = "1.0"
xcom = "insert (" || cmt "$) insert (VER:" name ver "(" || date() || ")"
IF t = "RX" THEN xcom = xcom "*" || "/)"
IF t = "XRC" THEN xcom = xcom || ")"
first
xcom
split
first